package com.derbysoft.lowcostadapter.dswitch3.translate.impl;

import com.derbysoft.dswitch.remote.hotel.dto.RequestHeader;
import com.derbysoft.lowcostadapter.commons.model.ProviderIdentification;
import com.derbysoft.lowcostadapter.utils.XMLUtils;

/**
 * Created by: jason
 * Date: 2012-10-08
 */
public abstract class DSwitch3AbstractTranslator extends XMLUtils {

    protected static final String TASK_ID = "TASK_ID";
    protected static final String DESTINATION = "lowcostbeds";
    protected static final String SOURCE = "makemytrip";
    protected static final String LOGIN = "Login";
    protected static final String PASSWORD = "Password";
    protected static final String AGENT_REFERENCE = "AgentReference";

    protected String provider = "dswitch2-lowcostbeds-adapter";
    protected String adapter = "dswitch3-lowcostbeds-adapter";

    protected RequestHeader createHeader() {
        RequestHeader requestHeader = new RequestHeader();
        requestHeader.setTaskId(TASK_ID);
        requestHeader.setDestination(DESTINATION);
        requestHeader.setSource(SOURCE);
        return requestHeader;
    }

    protected ProviderIdentification createProviderId() {
        ProviderIdentification identification = new ProviderIdentification();
        identification.setUserName(LOGIN);
        identification.setPassWd(PASSWORD);
        identification.setAgentReference(AGENT_REFERENCE);
        return identification;
    }
}
